package com.yuanrui.circle.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanrui.circle.api.req.GetShareCommentReq;
import com.yuanrui.circle.api.req.RemoveShareCommentReq;
import com.yuanrui.circle.api.req.SaveShareCommentReplyReq;
import com.yuanrui.circle.api.vo.ShareCommentReplyVO;
import com.yuanrui.circle.server.entity.ShareCommentReply;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 评论及回复信息(ShareCommentReply)表服务接口
 *
 * @author makejava
 * @since 2024-07-28 16:15:01
 */
public interface ShareCommentReplyService extends IService<ShareCommentReply> {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    ShareCommentReply queryById(Long id);

    /**
     * 分页查询
     *
     * @param shareCommentReply 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<ShareCommentReply> queryByPage(ShareCommentReply shareCommentReply, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param shareCommentReply 实例对象
     * @return 实例对象
     */
    ShareCommentReply insert(ShareCommentReply shareCommentReply);

    /**
     * 修改数据
     *
     * @param shareCommentReply 实例对象
     * @return 实例对象
     */
    ShareCommentReply update(ShareCommentReply shareCommentReply);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    Boolean saveComment(SaveShareCommentReplyReq req);

    Boolean removeComment(RemoveShareCommentReq req);

    List<ShareCommentReplyVO> listComment(GetShareCommentReq req);
}
